package io.bdmc.modules.bss.service;

import java.util.HashMap;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import io.bdmc.common.utils.MyPage;
import io.bdmc.modules.bss.entity.DeviceAlarm;
import io.bdmc.modules.bss.entity.DeviceAlarmRealtime;
import io.bdmc.modules.bss.entity.DeviceFibreMatch;
import io.bdmc.modules.bss.model.DeviceAlarmParam;

/**
 * <p>
 * 设备报警 服务类
 * </p>
 *
 * @author ping
 * @since 2020-07-01
 */
public interface IDeviceAlarmService extends IService<DeviceAlarm> {

    MyPage<DeviceAlarm> mySelectPage(MyPage<DeviceAlarm> myPage, DeviceAlarmParam params);

    List<DeviceAlarm> selectAllLastAlarm();

    List<DeviceFibreMatch> deviceLastLengthAlarm();

    List<HashMap<String, Object>> alarmTypeSum(Long deptId);

    List<HashMap<String, Object>> alarmCodeSum(Long deptId);

    MyPage<DeviceAlarm> mySelectPagePermitAll(MyPage<DeviceAlarm> myPage, DeviceAlarmParam params);

    int alarmFibreCount(Long deptId);

    boolean saveByRealtimeAlarm(DeviceAlarmRealtime dbAlarm);

    /**
     * mqtt 查询历史告警
     * 
     * @return
     */
    List<DeviceAlarmRealtime> selectHistoryAlarmList(DeviceAlarmParam param);
}
